<?php

$sql="select * from slideshow order by id desc limit 0,3";
$slideshow_rows=selectAll($sql);

$sql="select * from other";
$other_row=selectOne($sql);

$sql="select * from pro_cate";
$pro_rows=selectAll($sql);

$pro_id=isset($_GET['pro_id'])?$_GET['pro_id']:$pro_rows[0]['id']; 
$sql="select * from pro_cate where id=$pro_id";
$pro_row=selectOne($sql);

$sql="select * from product where cateid=$pro_id order by id desc limit 0,1";
$r=selectOne($sql);
$pro_id=$r['id'];
$id=isset($_GET['id'])?$_GET['id']:$pro_id;

if(!$id){show("该分类无内容！",'index.php?m=home&c=pro_details&#pro_details');die;}
$sql="select * from product where id=$id";
$product_row=selectOne($sql);

include './html/home/pro_details.html';

?>